//
//  MCNewMarketingHead_textView.swift
//  StoreManage
//
//  Created by MC on 2018/6/26.
//  Copyright © 2018年 MC. All rights reserved.
//

import UIKit

class MCNewMarketingHead_textView: UIView {

    override init(frame: CGRect) {
        super.init(frame: frame)
                
        self.addSubview(titleLabel)
        titleLabel.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(15)
            make.height.equalTo(50)
            make.top.equalTo(self)
        }
        
        self.addSubview(titleTextView)
        titleTextView.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(15)
            make.right.equalTo(-15)
            make.top.equalTo(titleLabel.snp.bottom)
            make.height.equalTo(60)
        }
        
        self.addSubview(titleLlineView)
        titleLlineView.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.height.equalTo(1)
            make.top.equalTo(titleTextView.snp.bottom).offset(10)
        }
        
        
        
        self.addSubview(detailLabel)
        detailLabel.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(15)
            make.height.equalTo(50)
            make.top.equalTo(titleLlineView.snp.bottom).offset(0)
        }
        
        self.addSubview(detailTextView)
        detailTextView.snp.remakeConstraints { (make) ->Void in
            make.left.equalTo(15)
            make.right.equalTo(-15)
            make.top.equalTo(detailLabel.snp.bottom)
            make.height.equalTo(60)
        }
        
        self.addSubview(detailLineView)
        detailLineView.snp.remakeConstraints { (make) ->Void in
            make.left.right.equalTo(self)
            make.height.equalTo(1)
            make.top.equalTo(detailTextView.snp.bottom).offset(10)
        }

    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    private lazy var titleLabel: UILabel = {
        let label = UILabel()
        label.text = "活动标题"
        label.font = UIFont.boldSystemFont(ofSize: 16)
        label.textColor = UIColor.MCWords
        return label
    }()
    
    public lazy var titleTextView: MCTextView = {
        let view = MCTextView()
        view.backgroundColor = UIColor.MCGray_light
        view.textView.font = MCFont(14)
        view.placeholder = "请输入活动标题"
        view.returnKeyType = MCReturnKeyType.done
        view.limitCount = 25
        return view
    }()
    
    private lazy var titleLlineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.MCGray_light
        return view
    }()
    
    private lazy var detailLabel: UILabel = {
        let label = UILabel()
        label.text = "活动描述"
        label.font = UIFont.boldSystemFont(ofSize: 16)
        label.textColor = UIColor.MCWords
        return label
    }()
    
    public lazy var detailTextView: MCTextView = {
        let view = MCTextView()
        view.backgroundColor = UIColor.MCGray_light
        view.textView.font = MCFont(14)
        view.placeholder = "请输入活动描述"
        view.returnKeyType = MCReturnKeyType.done
        view.limitCount = 30

        return view
    }()
    
    private lazy var detailLineView: UIView = {
        let view = UIView()
        view.backgroundColor = UIColor.MCGray_light
        return view
    }()
}
